# name : proc power survival, for power given analysis time, to explore follow-up time
# key : power.survival.power.given.time
# contributor: Shuguang Sun
# --
ods output output=${99:mod}_desgin;
proc power;
   * Lakatos (1988) and Cantor, Based on Markov Chain;
   * power vs `expected` number of events, given analysis time;
   twosamplesurvival test = logrank
      curve("Standard")=${1:med_soc}:0.5
      /* curve("Proposed")=${2:med_trt}:0.5 */
      refsurvival="Standard"
      hazardratio=${3:0.7}
      accrualtime=${4:12} accrualratetotal=${5:30} followuptime=${6:1 2 12}
      /* Group 1 is reference group */
      groupweights=(1 1)
      grouplossexphazards=(${7|0.00427,0.00878,0.013543|} $6)
      nsubinterval=12
      sides=1 alpha=${8:0.025} power=.
      run;
run;